home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
comm
/
thor
/
thor24arexx.lha
/
Examples
/
CountFiles.br
< prev
next >
Wrap
Text File
|
1996-11-11
|
872b
|
51 lines
/* CountFiles.br
*
* Count the files in a file database..
*/
parse arg argument
if(argument = '') then
do
say '$VER: CountFiles.br V3.1 (27.01.95)'
say 'Template: BBSNAME/A'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
address BBSREAD
GETFAREALIST stem FAREALIST argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
files = 0
say 'Available file areas:'
do i=1 to FAREALIST.COUNT
GETFAREADATA fareaname FAREALIST.i stem FAREADATA argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
say ' ' || left(FAREALIST.i,20) || right(FAREADATA.NUMFILES, 6)
files = files + FAREADATA.NUMFILES
end
say left("",21) || "------"
say right("Sum: ", 21) || right(files, 6)
say left("",21) || "======"
exit